package com.ctshk.rpc.starvip.enums.transaction;

import com.ctshk.common.enums.SystemBusinessType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @BelongsPackage: com.ctshk.rpc.starvip.enums
 * @Author: 李新科
 * @CreateTime: 2021-06-23 16:41
 * @Description: 板块产品
 */

@Getter
@AllArgsConstructor
public enum StarVipTransactionProduct {

    OUTBOUND_TRAVEL_PRODUCT("8821520500","主題遊","8821520000","港澳參團遊",SystemBusinessType.OUTBOUND_TRAVEL),
    INBOUND_TRAVEL_PRODUCT("8821520500","主題遊","8821520000","港澳參團遊",SystemBusinessType.INBOUND_TRAVEL),
    FIXED_PACKAGE_TICKET_PRODUCT("8821510600","其他自由行","8821510000","港澳自由行",SystemBusinessType.FIXED_PACKAGE_TICKET),
    DYNAMIC_PACKAGE_TICKET_PRODUCT("8821510600","其他自由行","8821510000","港澳自由行",SystemBusinessType.DYNAMIC_PACKAGE_TICKET),
    AIR_TICKET_PRODUCT("8821090100","機票類","8821090000","單項委託",SystemBusinessType.AIR_TICKET),
    HOTEL_PRODUCT("8821090200","酒店類","8821090000","單項委託",SystemBusinessType.HOTEL),
    TRAIN_TICKET_PRODUCT("8821090300","火車巴士船票","8821090000","單項委託",SystemBusinessType.TRAIN_TICKET),
    ATTRACTION_TICKET_PRODUCT("8821090600","票券類","8821090000","單項委託",SystemBusinessType.ATTRACTION_TICKET),
    BUS_TICKET_PRODUCT("8821090300","火車巴士船票","8821090000","單項委託",SystemBusinessType.BUS_TICKET),
    AIR_EXPRESS_PRODUCT("8821090300","火車巴士船票","8821090000","單項委託",SystemBusinessType.AIR_EXPRESS),
    LOCAL_FUN_PRODUCT("8821090300","火車巴士船票","8821090000","單項委託",SystemBusinessType.LOCAL_FUN),
    SHIP_TICKET_PRODUCT("8821090300","火車巴士船票","8821090000","單項委託",SystemBusinessType.SHIP_TICKET),


    ;
    /**
     * 板塊產品编码
     */
    private String code;
    /**
     * 板塊產品描述
     */
    private String desc;

    /**
     * 三级产品目录编码
     */
    private String partNumber;

    /**
     * 三级产品目录描述
     */
    private String partNumberDesc;

    /**
     * 系统业务类型
     */
    private SystemBusinessType systemBusinessType;

    public static StarVipTransactionProduct getBySystemBusinessType(SystemBusinessType systemBusinessType) {
        StarVipTransactionProduct[] values = StarVipTransactionProduct.values();
        for (StarVipTransactionProduct value : values) {
            if(value.getSystemBusinessType() == systemBusinessType) {
                return value;
            }
        }

        return null;
    }
}
